package com.retail.lottery.colalottery.utils;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class NetWorkUtil {
    public static String getLocalIp() {
        try {
            return InetAddress.getLocalHost().getHostAddress();
        } catch (UnknownHostException e) {
            e.printStackTrace();
            return null;
        }
    }

    public static void main(String[] args) {
        System.out.println("Local IP: " + getLocalIp());
    }
}

